<script>
export default {
  name: "CarouselComponent",
  data() {
    return {
      msg:'我是子组件传过来的',
      list:[1,2,3,4]
    }
  },
  methods:{
    toFather() {
      this.$emit('getSon',this.list)
    }
  },
  created() {
    // this.$emit('getSon',this.msg)
  }
}
</script>

<template>
<div class="swiper">
  <button @click="toFather"></button>
</div>
</template>

<style scoped lang="less">
.swiper {
  width: 1200px;
  height: 250px;
  margin: auto;
  background-color: #17568d;
}
</style>